#!usr/bin/env python
# -*- coding:utf-8 _*-
"""
@author:zhengxin
@file: 020_rhombus.py
@time: 2024/12/19  10:23
# @describe:
"""

"""
打印出如下图案（菱形）:
  *
 ***
 *****
*******
 *****
 ***
  *
"""

def rhombus():
    # 使用绝对值
    num = 7
    for i in range(num):
        # 计算空格数blank
        blank = abs(num // 2 - i)
        print(' '*blank + '*' *(num-2*blank) + ' ' * blank)

rhombus()